﻿//显示微信图片
function showImg(url) {
    var frameid = 'frameimg' + Math.random();
    window.img = '<img id="img" src=\'' + url + '?' + Math.random() + '\' style="max-width:100%"/><script>window.onload = function() { parent.document.getElementById(\'' + frameid + '\').height = document.getElementById(\'img\').height+\'px\'; }<' + '/script>';
    document.write('<iframe id="' + frameid + '" src="javascript:parent.img;" frameBorder="0" scrolling="no" width="100%"></iframe>');
}